package vip.specimen.system.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import vip.specimen.system.datasource.entity.SystemResourceKindEntity;
import vip.specimen.system.datasource.entity.SystemResourceSuffixEntity;

import java.util.List;
import java.util.UUID;

/**
 * *@Author: 余浪人
 * *@Date：2021/3/10 15:00
 * *@Email:yulangren520@Gmail.com
 * *@QQ:1368419640
 **/
@Repository
public interface SystemResourceSuffixRepository extends JpaRepository<SystemResourceSuffixEntity, UUID>{
    SystemResourceSuffixEntity findSystemResourceSuffixEntityBySuffix(String suffix);

    List<SystemResourceSuffixEntity> findSystemResourceSuffixEntityByKindEntityIsNullOrderByCreateTimeDesc();

    List<SystemResourceSuffixEntity> findSystemResourceSuffixEntityByKindEntity_UuidOrKindEntityIsNullOrderByCreateTimeDesc(UUID uuid);

    List<SystemResourceSuffixEntity> findSystemResourceSuffixEntityByKindEntityOrderByCreateTimeDesc(SystemResourceKindEntity kindEntity);
}
